#e
#Title[fuf[Wo^tCv]
#Text[IWi]
#ScriptVersion[2]


script_enemy_main {


 @Initialize {
  CutIn(KOUMA, name, GetCurrentScriptDirectory~"\img\riguru.png", 0, 0, 235, 400);
  SetX(GetCenterX);
  SetY(GetCenterY-120);
  SetLife(3500);
  SetScore(1000000);
  SetTimer(99);

  LoadUserShotData(GetCurrentScriptDirectory~"shot_All.txt");
  LoadGraphic(img);
  SetTexture(img);
  SetGraphicRect(1, 1, 128, 128);

  TMain;

}

    @MainLoop {
  SetCollisionA(GetX, GetY, 24);
  SetCollisionB(GetX, GetY, 24);

  yield;

}

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
 }

  task TMain { 
  let angle   = rand(0,360);
  let t = 0;
      yield; 


	loop{
	wait(5); 
        loop(3) {   
CreateShotA(1,(cos(t) * 50) + GetX,(sin(t) * 50) + GetY,0);
SetShotDataA(1,1,2,angle,0,0,0,44);
SetShotDataA(1,30,2,angle,0,0,0,44);
SetShotDataA(1,60,1.5,angle,5,0,0,44);
SetShotDataA(1,120,0,angle,1,0,0,44);
SetShotDataA(1,180,2,angle,2,0,0,107);
SetShotDataA(1,240,2,angle,1,0,0,107);
SetShotDataA(1,360,1,angle -120,0,0,0,107);
FireShot(1);
angle += rand(0,360);
   }
	t += 10;

 }
}

#include_function ".\ϐ.txt"

}

